package com.xhlj.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

import com.xhlj.mapper.CommentMapper;
import lombok.Data;
import org.w3c.dom.stylesheets.LinkStyle;

/**
 * 帖子下的评论表
 *
 * @TableName comment
 */
@TableName(value = "comment")
@Data
public class Comment implements Serializable {
    /**
     * 评论id
     */
    @TableId(type = IdType.AUTO)
    private Integer commentId;

    /**
     * 对应帖子id
     */
    private Integer postId;

    /**
     * 发布评论的用户
     */
    private Integer userId;

    /**
     * 评论内容
     */
    private String content;

    /**
     * 评论时间
     */
    private Date createdTime;

    /**
     * 点赞数
     */
    private Integer liked;

    /**
     * 表示该评论回复了其他人的评论
     */
    private Integer replyId;
    @TableField(exist = false)
    private List<Comment> replyList;
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}